package com.ruoyi.reunion.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.reunion.mapper.UserNotificationMapper;
import com.ruoyi.reunion.domain.UserNotification;
import com.ruoyi.reunion.service.IUserNotificationService;

/**
 * 用户通知关联Service业务层处理
 * 
 * @author ccccc
 * @date 2025-04-09
 */
@Service
public class UserNotificationServiceImpl implements IUserNotificationService 
{
    @Autowired
    private UserNotificationMapper userNotificationMapper;

    /**
     * 查询用户通知关联
     * 
     * @param id 用户通知关联主键
     * @return 用户通知关联
     */
    @Override
    public UserNotification selectUserNotificationById(Long id)
    {
        return userNotificationMapper.selectUserNotificationById(id);
    }

    /**
     * 查询用户通知关联列表
     * 
     * @param userNotification 用户通知关联
     * @return 用户通知关联
     */
    @Override
    public List<UserNotification> selectUserNotificationList(UserNotification userNotification)
    {
        return userNotificationMapper.selectUserNotificationList(userNotification);
    }

    /**
     * 新增用户通知关联
     * 
     * @param userNotification 用户通知关联
     * @return 结果
     */
    @Override
    public int insertUserNotification(UserNotification userNotification)
    {
        userNotification.setCreateTime(DateUtils.getNowDate());
        return userNotificationMapper.insertUserNotification(userNotification);
    }

    /**
     * 修改用户通知关联
     * 
     * @param userNotification 用户通知关联
     * @return 结果
     */
    @Override
    public int updateUserNotification(UserNotification userNotification)
    {
        userNotification.setUpdateTime(DateUtils.getNowDate());
        return userNotificationMapper.updateUserNotification(userNotification);
    }

    /**
     * 批量删除用户通知关联
     * 
     * @param ids 需要删除的用户通知关联主键
     * @return 结果
     */
    @Override
    public int deleteUserNotificationByIds(Long[] ids)
    {
        return userNotificationMapper.deleteUserNotificationByIds(ids);
    }

    /**
     * 删除用户通知关联信息
     * 
     * @param id 用户通知关联主键
     * @return 结果
     */
    @Override
    public int deleteUserNotificationById(Long id)
    {
        return userNotificationMapper.deleteUserNotificationById(id);
    }
}
